﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Wap/Shop/ShopSite.Master" AutoEventWireup="true"  CodeBehind="FavoriteList.aspx.cs" Inherits="ZLCMS.Web.Wap.Member.FavoriteList" %>

<%@ Import Namespace="ZLCMS.Business.Util" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>我的收藏</title>
    <!--E banner-->
    <style type="text/css">
    </style>
    <!--panel 打开时禁止滚动-->
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="pages" runat="server">
<!--S page -->
<div data-role="page" id="mypage">

	<!--S header -->
	<div data-role="header">
	</div>
    <!--E header -->

    <!--S panel-->
    <div data-role="panel" id="mypanel" data-display="overlay" >   
    </div>
    <!--E panel-->
	
    <!--S content -->
	<div role="main" class="ui-content">
  	<!--s prolist_nav-->
        <div class="searchResultContainer">
        	<ul id="searchResult" data-role="listview" data-inset="true" data-shadow="false">
            </ul>
        </div>
        <!--e prolist_nav-->

        <!--s proList-->
                <button id="btnMore" data-icon="refresh" style="width: 95%; margin-left: auto; margin-right: auto;">显示更多</button>
       
        <!--e proList-->
        
    </div>
    <!--E content -->
</div>
<!--E page -->
  
<script src="/wap/lib/common/listviewHandler.js" type="text/javascript"></script>
<script type="text/javascript">

    function queryData() {
        var handler = $('#searchResult').listviewHandler();
        handler.initialize({
            loaderBtn: $('#btnMore'), //加载数据按钮（点击加载下一页）
            emptyHtml: '<div style="text-align: center; font-size: 12px; color:#666; margin-top:2em">-- 暂无记录 --</div>', //无记录时显示此html
            itemTemplate: '<li><a href="{TargetUrl}" data-ajax="false">' +
                    '<img src="{TargetImg}">' +
                    '<h2>{TargetTitle}</h2>' +
                    '<p>{Remark}</p>' +
                '</a></li>', //项模板
            pageIndex: 1, //页码（从1起算）
            pageSize: 20, //页大小
            totalCount: 999, //总记录数
            itemHandler: function (data, itemTemplate, container) {//数据各项处理
                data.TargetImg = firstFilePath(data.TargetImg);

                return itemTemplate.format(data);
            },
            afterHandleResult: function (result, totalCount, container) {
                $('#searchResult').listview("refresh");
            },
            command: 'Member.LoadFavoriteList',
            parameter: { MemberAccount: '<%=CurrentMemberAccount %>' }
        });
        handler.nextPage();
    }

    $(function () {
        queryData();
    });
</script>

</asp:Content>
